package com.levi.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author shentong
 * @since 2022/4/5 11:43 AM
 */
@Data
@TableName("mall_order_item")
@ApiModel("订单详情实体类")
public class OrderItem extends BaseEntity{

    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    @TableField("user_id")
    @ApiModelProperty("用户ID")
    private Integer userId;

    @TableField("order_no")
    @ApiModelProperty("订单号")
    private Long orderNo;

    @TableField("product_id")
    @ApiModelProperty("商品ID")
    private Integer productId;

    @TableField("product_name")
    @ApiModelProperty("商品名称")
    private String productName;

    @TableField("product_image")
    @ApiModelProperty("商品图片地址")
    private String productImage;

    @TableField("current_unit_price")
    @ApiModelProperty("生成订单时的商品单价，单位是元,保留两位小数")
    private BigDecimal currentUnitPrice;

    @TableField("quantity")
    @ApiModelProperty("商品数量")
    private Integer quantity;

    @TableField("total_price")
    @ApiModelProperty("商品总价,单位是元,保留两位小数")
    private BigDecimal totalPrice;

}
